package com.example.administrator.viewpaerdemo.fragment;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

/**
 * Created by Administrator on 2018/8/27.
 */

public class AFragment extends Fragment {


    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        TextView textView= new TextView(getContext());
        textView.setText("我是主页");
        return textView;
    }

    @Override
    public void onAttach(Context context) {
        super.onAttach(context);
        Log.e("TAG","AFragment==onAttach");
    }


    @Override
    public void onDetach() {
        super.onDetach();
        Log.e("TAG","AFragment==onDetach");
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        Log.e("TAG","AFragment==onDestroyView");
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        Log.e("TAG","AFragment==onDestroy");
    }
}
